class Animals:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def eat(self):
        print(f'{self.name}在吃东西')

    def drink(self):
        print(f'{self.name}在喝水')


class Dog(Animals):
    def guard(self):
        print(f'{self.name}在看家')


class Flydog(Dog):
    def fly(self):
        print(f'{self.name}在天上飞')


flydog = Flydog('大白', 50)

flydog.guard()
flydog.eat()
flydog.drink()
flydog.fly()